package com.rcadmin.busi.logview.dao;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.rcadmin.busi.logview.ddl.ProjectRefResourceDO;
import com.rcadmin.common.contant.IsEff;
import com.rcadmin.core.jpa.BaseDao;
import com.rcadmin.core.jpa.DaoException;

/**
 * 项目关联的资源DAO
 * 
 * @author tanson lam
 * @create 2016年9月6日
 */
@Component
public class ProjectRefResourceDao {
	@Resource
	private BaseDao baseDao;

	/**
	 * 查看项目的服务器资源
	 * 
	 * @param projectId
	 * @throws DaoException
	 */
	public List<ProjectRefResourceDO> findByPrjId(Integer projectId)
			throws DaoException {
		return baseDao.find("project_id=" + projectId + " and iseff='"
				+ IsEff.EFFECTIVE + "' ", ProjectRefResourceDO.class);

	}
}
